home *** CD-ROM | disk | FTP | other *** search
- LPTCHK Ver. 1.0 4/87 Public Domain R.VanderKinter Madison WI
-
- used as follows:
-
- LPTCHK n
-
- where n is the lpt port # to check.
-
- Returns ERRORLEVEL as follows:
-
- 4 OR HIGHER -GENERAL ERROR
- 3 -CABLE NOT CONNECTED
- 2 -PAPER OUT
- 1 -PRINTER OFF LINE
- 0 -PRINTER IS READY
-
-
-
-
- LPTCHK when run, will set the ERRORLEVEL, and print a message indicating
- what the ERRORLEVEL will be set to (unless redirected, e.g. > nul).
-
-
- LPTCHK<return>
- displays instructions for use.
-
-
- LPTCHK <return>
- at least one space causes LPTCHK to default to and check LPT1:,
- set the errorlevel, and display what the errorlevel is set to.
-
-
- LPTCHK 1<return>
- LPTCHK will check LPT1:, set the errorlevel,
- and display what the errorlevel is set to.
-
-
- LPTCHK 2<return>
- LPTCHK will check LPT2:, set the errorlevel,
- and display what the errorlevel is set to.
-
-
- LPTCHK 123<return>
- LPTCHK will check LPT1:, set the errorlevel,
- and display what the errorlevel is set to.
-
-
- LPTCHK 1 > nul<return>
- LPTCHK will check LPT1:, set the errorlevel,
- but will not display what the errorlevel is set to.
-
-
-
-
-
-
-
- This is an EXAMPLE.BAT file using LPTCHK to check the printer status.
-
-
- ECHO OFF
- LPTCHK %1 > NUL
- IF ERRORLEVEL == 4 GOTO E4
- IF ERRORLEVEL == 3 GOTO E3
- IF ERRORLEVEL == 2 GOTO E2
- IF ERRORLEVEL == 1 GOTO E1
- IF ERRORLEVEL == 0 ECHO ..... PRINTER IS READY
- GOTO END
- :E4
- ECHO ..... GENERAL ERROR
- GOTO END
- :E3
- ECHO ..... CABLE NOT CONNECTED
- GOTO END
- :E2
- ECHO ..... OUT OF PAPER
- GOTO END
- :E1
- ECHO ..... PRINTER OFF LINE
- :END
-
-
- This is a shorter version of EXAMPLE.BAT:
-
- ECHO OFF
- LPTCHK %1 > NUL
- IF ERRORLEVEL == 1 GOTO E1
- IF ERRORLEVEL == 0 ECHO ..... PRINTER IS READY
- GOTO END
- :E1
- ECHO ..... PRINTER ERROR
- :END
-
-
- To use either of these, type:
-
- EXAMPLE n<return>
-
- n = the printer port you wish to check.
- ════════════════════════════════════════════════════════════════════════════════
- Comments about LPTCHK may be left in messages for: Marty Shannon
- Cooperworks BBS
- (608)251-7734
-